package com.zh.media.domain.dto;

import com.zh.web.base.BaseDto;
import com.zh.web.enums.Status;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(value = "修改文章参数")
public class UpdateArticleDto extends BaseDto implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "文章id", required = true)
    @NotNull(message = "文章id不能为空")
    private Long id;
    @ApiModelProperty(value = "标题")
    private String title;
    @ApiModelProperty("副标题")
    @Max(value = 500, message = "副标题长度不能超过500字")
    private String subTitle;
    @ApiModelProperty("作者")
    private String author;
    @ApiModelProperty("内容")
    @Size(min = 300, max = 20000, message = "内容长度在300字-20000字间")
    private String content;
    @ApiModelProperty(value = "创作类型 由字典选取")
    private String creationType;
    @ApiModelProperty("来源地址 转载时提供")
    private String source;
    @ApiModelProperty(value = "内容类型 由字典选取")
    private String contentType;
    @ApiModelProperty("法条类型 由字典选取")
    private String lawType;
    @ApiModelProperty("文章状态 由字典选取")
    private Status status;
}
